﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using PcapDotNet.Base;
using PcapDotNet.Core;
using PcapDotNet.Packets;

namespace MolyMade.Mute
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            comboBox.ItemsSource = Devices.GetDevices();
        }

        private void button_Click(object sender, RoutedEventArgs e)
        {
            Packet p = ArpPacket.BuildArpReplyPacket(Mac.Random, Mac.Random, "192.168.1.41",
                "192.168.1.100");
            var d = comboBox.SelectedItem as NetworkDevice;
            SendPacket.SendAPacket(d?.Device , p);
        }
    }
}
 